|
|
Thorsten Froehlich <tho### [at] trfde> wrote:
: #define T1 A
: #define T2 B
: #define TEMPLATE_swap swap_AB
: #include "mytmpl.h"
: #undef T1
: #undef T2
What is shorter, to write the 6 lines of code above for every pair of
structs you use, or just write the swap function directly?
Perhaps in this case it could be better to have a 'swap' method inside
the classes/structs, so you could write:
a.swap(b);
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|